#pragma once
#include "redBlackTree.h"

namespace hd
{
	template <class k>
	class set
	{
		struct SetKeyOfT
		{
			const k& operator()(const k& key)
			{
				return key;
			}
		};

		RBTree<k, const k, SetKeyOfT> _t;

	public:
		typedef typename RBTree<k, const k, SetKeyOfT>::iterator iterator;
		typedef typename RBTree<k, const k, SetKeyOfT>::const_iterator const_iterator;

		set()
		{

		}
		set(const initializer_list<const k>& il)
			:_t(il)
		{
			
		}
		pair<iterator, bool> insert(const k& key)
		{
			return _t.Insert(key);
		}
		iterator begin()
		{
			return _t.Begin();
		}
		const_iterator begin()const
		{
			return _t.Begin();
		}
		iterator end()
		{
			return _t.End();
		}
		const_iterator end()const
		{
			return _t.End();
		}
		iterator find(const k& key)
		{
			return _t.Find(key);
		}
		const_iterator find(const k& key)const
		{
			return _t.Find(key);
		}
	};
}
